def dz(n, m):
    x = (4*n-m)//2
    y = (m-2*n)//2
    return x, y


def main():
    a = int(input())
    for i in range(a):
        n, m = map(int, input().split())
        if m % 2 != 0 or m < 2*n or m > 4*n:
            print("No answer")
        else:
            print(dz(n, m))


main()
